package com.example.administrator.runbook.findfragment.network;

import com.example.administrator.runbook.findfragment.model.BookBtocData;
import com.example.administrator.runbook.findfragment.model.BookItem;
import com.example.administrator.runbook.findfragment.model.BookList;
import com.example.administrator.runbook.findfragment.model.BookMessage;
import com.example.administrator.runbook.findfragment.model.BookMessageList;
import com.example.administrator.runbook.findfragment.model.FindClassify;
import com.example.administrator.runbook.findfragment.model.FindClassifyItemAll;

import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by 俊峰 on 2016/11/8.
 */

public interface GetFindClassifyService {

    @GET("/cats/lv2/statistics")
    Observable<FindClassify> getClassify();

    @GET("/cats/lv2")
    Observable<FindClassifyItemAll> getClassifyItemAll();

    //http://api.zhuishushenqi.com/book/by-categories?gender=male&type=hot&major=武侠&minor=&start=0&limit=20
    @GET("/book/by-categories")
    Observable<BookList> getBookList(@Query("gender") String gender,
                                     @Query("type") String type,
                                     @Query("major") String major,
                                     @Query("minor") String minor,
                                     @Query("start") String start,
                                     @Query("limit") String limit);

    //http://api.zhuishushenqi.com/book/5559c3f38e9e69be5a0da51d
    @GET("/book/{id}")
    Observable<BookItem> getBookItem(@Path("id") String id);

    //http://api.zhuishushenqi.com/btoc?view=summary&book=54a27f6a9f324bb07f71bdf7
    @GET("/btoc")
    Observable<BookBtocData[]> getBookBtocData(@Query("view") String view, @Query("book") String book);

    //http://api.zhuishushenqi.com/btoc/573d4c0c3402393f142d7f8a?view=chapters
    @GET("/btoc/{id}")
    Observable<BookMessageList> getBookMessageList(@Path("id") String id, @Query("view") String view);

    //http://chapter2.zhuishushenqi.com/chapter/http://vip.zhuishushenqi.com/chapter/573d4c0cfba5ce777b18b5b1?cv=1472100266593
    @GET("/chapter/{url}")
    Observable<BookMessage> getBookMessage(@Path("url") String url);
}
